/*TABLE TBL_ACCOUNT_PLANNING_PRODUCT_HOLDING*/
DELETE FROM TBL_ACCOUNT_PLANNING_PRODUCT_HOLDING

INSERT TBL_ACCOUNT_PLANNING_PRODUCT_HOLDING
select * from [SERVER12].[SMECUSTOMER360].DBO.TBL_ACCOUNT_PLANNING_PRODUCT_HOLDING

INSERT TBL_ACCOUNT_PLANNING_PRODUCT_HOLDING
	SELECT CRITERIA, 'N','N', 'N','N','N','N', 'N','N','N','N', 'N','N','N','N', B.CIF, NULL, NULL, 0, DATA_TYPE,ORDER_NUM, GROUP_CRI, GROUP_ROW
	FROM TBL_ACCOUNT_PLANNING_CRITERIA AS A, TBL_ACCOUNT_PLANNING AS B WHERE A.CRI_TYPE=1 and b.CIF not in (select cif from TBL_ACCOUNT_PLANNING_PRODUCT_HOLDING)


	delete from TBL_ACCOUNT_PLANNING_PRODUCT_HOLDING_RESULT


insert TBL_ACCOUNT_PLANNING_PRODUCT_HOLDING_RESULT
SELECT * FROM TBL_ACCOUNT_PLANNING_PRODUCT_HOLDING